const http = require("http");

http.createServer((req, res) => {
    var str = "";
    req.on("data", (chunk) => {
        str += chunk;
    })
    req.on("end", () => {
        var obj = JSON.parse(str);
        console.log(obj.userName, obj.pwd);
    })
}).listen(8081)